Skip to content

chore: migrate from yarn to pnpm - #5849

Open
jmfrancois wants to merge 27 commits into
masterfrom
chore/migrate-yarn-to-pnpm
Open

jmfrancois wants to merge 27 commits into
masterfrom
chore/migrate-yarn-to-pnpm

Conversation

@jmfrancois

@jmfrancois jmfrancois commented Sep 4, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Migrate the monorepo from Yarn Classic to pnpm (isolated/strict node_modules), converting root config, all tools/scripts-* CLIs that shelled out to yarn, and CI workflows.
  • Delete tools/scripts-config-react-webpack and tools/scripts-config-cdn (dead, zero real consumers) instead of patching their yarn-hoisting-coupled code, in line with the ongoing webpack→vite / jest→vitest migration.
  • Fix phantom-dependency issues that only worked under yarn's flat hoist (scripts-core's prettier/stylelint resolution, per-package resolutions in packages/components) and a critical one caught during validation: internal @talend/* deps don't use the workspace: protocol, so plain pnpm install silently resolved them from the npm registry instead of linking local workspace code — fixed via linkWorkspacePackages: true.
  • Retire .github/workflows/yarn-deduplicate.yml (pnpm dedupes natively).
  • Drop @talend/scripts-publish-local entirely (unused local-registry helper, no consumers) and its pending changeset.

Test plan

  • pnpm install completes clean with no phantom-dependency errors
  • pnpm build:lib succeeds across all 26 workspace packages
  • talend-scripts extends resolves all 5 generated config branches (prettier/stylelint/eslint/babel/typescript) end-to-end
  • Rewritten talend-yarn-workspace CLI runs correctly against pnpm -r run --if-present
  • ESLint config loads and runs under pnpm (only pre-existing lint debt surfaced, no resolution crashes)
  • CI green on this PR (workflows converted but not yet run)

🤖 Generated with Claude Code

Switches package management from Yarn Classic to pnpm (isolated linker),
retiring the webpack/CDN tooling that carried yarn-hoisting assumptions
(scripts-config-react-webpack, scripts-config-cdn) instead of patching
them, in line with the ongoing webpack->vite and jest->vitest migration.

- Delete scripts-config-react-webpack and scripts-config-cdn (dead,
  no real consumers; held every yarn-hoisting-coupled hack found).
- Remove dead jest branch in scripts-core/extends.js and orphaned jest
  config block in packages/http.
- Declare scripts-config-prettier/stylelint as real deps of scripts-core
  (previously phantom deps that only worked via yarn's flat hoist).
- Rewrite scripts-yarn-workspace to shell out to `pnpm -r run
  --if-present` instead of parsing `yarn workspaces info`.
- Swap scripts-publish-local's yarn CLI calls (registry/cache config)
  to pnpm equivalents.
- Root package.json/pnpm-workspace.yaml: packageManager, workspaces,
  resolutions -> overrides (including a stray per-package resolutions
  block pnpm doesn't read), script invocations, linkWorkspacePackages
  (needed since internal @talend/* deps don't use the workspace:
  protocol, so plain pnpm install silently resolved from the registry
  instead of linking local packages).
- Convert yarn.lock to pnpm-lock.yaml, update CI (composite setup
  action + all workflows), retire yarn-deduplicate.yml (pnpm dedupes
  natively).

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@changeset-bot

changeset-bot Bot commented Sep 4, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 8d0614e

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 3 packages
Name Type
@talend/scripts-core Minor
@talend/react-components Patch
@talend/http Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

jmfrancois and others added 3 commits September 4, 2026 17:37
Per-package changesets for the packages whose behavior actually changed in
the yarn->pnpm migration: react-components (build script + dropped
resolutions), http (dropped orphaned jest config), scripts-core (real deps
instead of phantom hoisted ones, dropped jest-config generation),
scripts-yarn-workspace (rewritten to shell out to pnpm, now requires pnpm),
scripts-publish-local (registry/cache setup now uses pnpm, now requires
pnpm). scripts-config-cdn and scripts-config-react-webpack are deleted
entirely, so changesets can't target them (not in the workspace); no
changeset added for those two.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
The package had already been rewritten to shell out to pnpm during the
yarn->pnpm migration, making it a thin wrapper around `pnpm -r run
<script> --if-present --workspace-concurrency=1`. Inline that pnpm
command directly into the two root scripts that used it
(vitest:update, test:cron) and remove the now-unused package, its
devDependency, and the superseded changeset that documented its
rewrite.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Unused local-registry helper superseded by pnpm equivalents; remove package and its pending changeset.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
GITHUB_TOKEN can't read private cross-repo packages. @talend/daikon-tql-client
is still private, so pnpm's cold install hits a 403 that yarn's warm cache
was masking. Revert the NPM_TOKEN input (and NODE_AUTH_TOKEN env) back to
secrets.NPM_TOKEN, as it was before ad59239.

Requires the NPM_TOKEN repo secret (a PAT with read:packages) to be
recreated in repo settings.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@jmfrancois
jmfrancois deployed to pull_request_unsafe September 18, 2026 11:58 — with GitHub Actions Active
@jmfrancois
jmfrancois deployed to pull_request_unsafe September 18, 2026 11:58 — with GitHub Actions Active
@jmfrancois
jmfrancois deployed to pull_request_unsafe September 18, 2026 11:58 — with GitHub Actions Active
@github-actions

github-actions Bot commented Sep 18, 2026

Copy link
Copy Markdown
Contributor
Title Lines Statements Branches Functions
cmf Coverage: 89%
89.43% (1244/1391) 83.46% (626/750) 89.76% (351/391)
cmf-cqrs Coverage: 86%
86.33% (158/183) 71.42% (60/84) 82.45% (47/57)
cmf-router Coverage: 70%
69.23% (135/195) 55.71% (78/140) 56.81% (25/44)
components Coverage: 90%
90.77% (5577/6144) 82.41% (3228/3917) 88.21% (1400/1587)
containers Coverage: 84%
83.42% (1389/1665) 75.16% (702/934) 75% (327/436)
dataviz Coverage: 86%
85.93% (330/384) 65.41% (157/240) 75.94% (120/158)
design-system Coverage: 67%
66.96% (1042/1556) 51.95% (558/1074) 53.92% (220/408)
faceted-search Coverage: 85%
85.33% (640/750) 80% (292/365) 82.24% (227/276)
flow-designer Coverage: 73%
72.34% (675/933) 77.71% (415/534) 71.02% (201/283)
forms Coverage: 86%
86.22% (1652/1916) 76.71% (939/1224) 84.77% (462/545)
http Coverage: 100%
100% (85/85) 98.07% (51/52) 100% (34/34)
sagas Coverage: 92%
92.3% (24/26) 66.66% (4/6) 50% (2/4)
stepper Coverage: 81%
81.91% (154/188) 61.29% (57/93) 81.25% (39/48)
utils Coverage: 100%
100% (73/73) 90.9% (10/11) 100% (24/24)

@jmfrancois
jmfrancois deployed to pull_request_unsafe September 18, 2026 12:06 — with GitHub Actions Active
@jmfrancois
jmfrancois deployed to pull_request_unsafe September 18, 2026 12:06 — with GitHub Actions Active
@jmfrancois
jmfrancois deployed to pull_request_unsafe September 18, 2026 12:06 — with GitHub Actions Active
@jmfrancois
jmfrancois marked this pull request as ready for review September 18, 2026 12:09
@jmfrancois
jmfrancois requested a lite review from Copilot September 18, 2026 12:09
@Talend Talend deleted a comment from Copilot AI Sep 18, 2026

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

The updated packages/cmf/vitest.config.ts include patterns drop the existing __tests__ suite, and PR workflows may fail for forked PRs due to reliance on secrets.NPM_TOKEN.

Get a fresh assessment by requesting another Copilot review.

Pull request overview

This PR migrates the Talend/UI monorepo from Yarn Classic workspaces to pnpm (isolated/strict node_modules) and updates internal tooling, docs, and CI workflows accordingly, while removing Yarn-specific helpers and dead configuration packages.

Changes:

  • Replace Yarn-based root and workspace scripts with pnpm equivalents, introduce pnpm-workspace.yaml, and pin pnpm via packageManager / .tool-versions.
  • Update CI workflows and the shared setup-node action to install/cache pnpm and to run installs/builds with pnpm.
  • Cleanup/migration fixes: remove the @talend/scripts-yarn-workspace package, drop legacy Jest config generation and orphaned Jest config blocks, and update i18n extraction configs to use pnpm.
File summaries
File Description
tools/scripts-yarn-workspace/src/workspace-run.js Removes Yarn workspace run implementation (package deleted as part of pnpm migration).
tools/scripts-yarn-workspace/src/run.js Removes Yarn spawn runner utility (package deleted).
tools/scripts-yarn-workspace/src/index.js Removes Yarn-workspace CLI entrypoint (package deleted).
tools/scripts-yarn-workspace/src/consume.js Removes command consumer for Yarn workspace runner (package deleted).
tools/scripts-yarn-workspace/README.md Removes docs for Yarn workspace helper (package deleted).
tools/scripts-yarn-workspace/package.json Removes the Yarn-workspace tool package definition (package deleted).
tools/scripts-yarn-workspace/eslint.config.mjs Removes lint config for deleted Yarn-workspace tool.
tools/scripts-yarn-workspace/CHANGELOG.md Removes changelog for deleted Yarn-workspace tool.
tools/scripts-core/src/scripts/extends.js Stops generating Jest config in extends (aligns with Jest phase-out and pnpm constraints).
tools/scripts-core/package.json Adds explicit deps for prettier/stylelint configs to avoid pnpm phantom-dep resolution issues.
tools/scripts-core/doc/migration.md Updates migration docs to pnpm commands.
tools/scripts-core/doc/getting-started.md Updates install docs to pnpm and removes webpack-react config mention.
tools/scripts-config-storybook-lib/README.md Updates installation command example to pnpm.
tools/scripts-config-eslint/README.md Updates usage example from yarn to pnpm.
tools/scripts-cmf/README.md Updates command examples and JSON formatting in docs.
pnpm-workspace.yaml Adds pnpm workspace definition and workspace-level overrides/settings.
packages/stepper/talend-i18n.json Switches i18n extraction method from yarn to pnpm.
packages/icons/vite.config.ts Prevents bundling Node builtins by marking them as Rollup externals for library build.
packages/http/package.json Removes orphaned Jest configuration block.
packages/forms/talend-i18n.json Switches i18n extraction method from yarn to pnpm.
packages/faceted-search/talend-i18n.json Switches i18n extraction method from yarn to pnpm.
packages/design-system/talend-i18n.json Switches i18n extraction method from yarn to pnpm.
packages/dataviz/talend-i18n.json Switches i18n extraction method from yarn to pnpm.
packages/containers/talend-i18n.json Switches i18n extraction method from yarn to pnpm.
packages/components/talend-i18n.json Switches i18n extraction method from yarn to pnpm.
packages/components/package.json Updates internal script invocation to pnpm and removes Yarn resolutions.
packages/cmf/vitest.config.ts Adjusts Vitest include/exclude patterns (currently risks excluding existing tests).
package.json Switches root scripts to pnpm, removes Yarn workspace config/resolutions, pins pnpm via packageManager.
.tool-versions Pins pnpm (and Node) versions for asdf/tooling.
.github/workflows/yarn-deduplicate.yml Removes Yarn-only deduplication workflow.
.github/workflows/visual-testing.yml Migrates workflow install/build steps to pnpm and updates auth token source.
.github/workflows/pre-release.yml Migrates pre-release workflow to pnpm (install/build/changesets).
.github/workflows/pr-test.yml Migrates PR test workflow to pnpm and updates token usage.
.github/workflows/pr-lint.yml Migrates PR lint workflow to pnpm and updates token usage.
.github/workflows/pr-demo.yml Migrates PR demo workflow to pnpm and updates token usage.
.github/workflows/icons.yml Updates setup-node invocation token source.
.github/workflows/demo.yml Migrates demo workflow install/build steps to pnpm and updates token usage.
.github/workflows/changeset.yml Migrates release workflow to pnpm and updates auth token source for install/publish.
.github/actions/setup-node/action.yml Installs pnpm and caches pnpm store (replaces Yarn caching).
.changeset/warm-llamas-hoist.md Records patch change for removing dead Jest config from @talend/http.
.changeset/six-otters-migrate.md Records patch change for @talend/react-components script + removal of per-package resolutions.
.changeset/quiet-goats-pnpm.md Records @talend/scripts-core change for explicit config deps + dropping Jest config generation.
Review details
  • Files reviewed: 42/44 changed files
  • Comments generated: 5
  • Review effort level: Lite

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

uses: ./.github/actions/setup-node
with:
NPM_TOKEN: ${{ github.token }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
uses: ./.github/actions/setup-node
with:
NPM_TOKEN: ${{ github.token }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
uses: ./.github/actions/setup-node
with:
NPM_TOKEN: ${{ github.token }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
uses: ./.github/actions/setup-node
with:
NPM_TOKEN: ${{ github.token }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
Comment thread packages/cmf/vitest.config.ts Outdated
@jmfrancois
jmfrancois deployed to pull_request_unsafe September 18, 2026 12:33 — with GitHub Actions Active
@jmfrancois
jmfrancois deployed to pull_request_unsafe September 18, 2026 12:33 — with GitHub Actions Active
@jmfrancois
jmfrancois deployed to pull_request_unsafe September 18, 2026 12:40 — with GitHub Actions Active
@jmfrancois
jmfrancois deployed to pull_request_unsafe September 18, 2026 12:40 — with GitHub Actions Active
@jmfrancois
jmfrancois deployed to pull_request_unsafe September 18, 2026 12:41 — with GitHub Actions Active
@jmfrancois
jmfrancois deployed to pull_request_unsafe September 18, 2026 13:03 — with GitHub Actions Active
@jmfrancois
jmfrancois deployed to pull_request_unsafe September 18, 2026 13:03 — with GitHub Actions Active
@jmfrancois
jmfrancois deployed to pull_request_unsafe September 18, 2026 13:03 — with GitHub Actions Active
@jmfrancois
jmfrancois deployed to pull_request_unsafe September 18, 2026 15:46 — with GitHub Actions Active
@jmfrancois
jmfrancois deployed to pull_request_unsafe September 18, 2026 15:46 — with GitHub Actions Active
@jmfrancois
jmfrancois deployed to pull_request_unsafe September 18, 2026 15:46 — with GitHub Actions Active
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants